﻿<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
        xmlns:h="http://xmlns.jcp.org/jsf/html"
        xmlns:cc="http://xmlns.jcp.org/jsf/composite"
        xmlns:ui="http://xmlns.jcp.org/jsf/facelets">

<cc:interface>
    <cc:attribute name="interval" required="true"/>
</cc:interface>

<cc:implementation>
    <h:outputScript name="jsf.js" library="javax.faces" target="head"/>
    <h:outputScript name="ajaxPoll.js" library="mygourmet" target="head"/>
    <script type="text/javascript">
    startAjaxPoll('#{cc.clientId}', #{cc.attrs.interval});
    </script>
    <div id="#{cc.clientId}">
      <cc:insertChildren/>
    </div>
</cc:implementation>

</ui:composition>